<?php

define(__DSN__,"sqlite://./data/bowl.db?mode=666");
define(__DBFILE__,"data/bowl.db");

//define(__MGT__,"192.168.168.254");
define(__MGT__,"172.16.1.224");

define(__BOWLER__,"update bowlers set games=(SELECT count(pins) FROM games WHERE bowler_id=bowlers.id), avg=(SELECT avg(pins) FROM games WHERE bowler_id=bowlers.id), pins=(SELECT sum(pins) FROM games WHERE bowler_id=bowlers.id), score=(SELECT sum(total) FROM games WHERE bowler_id=bowlers.id)");
define(__HANDICAP__,"update bowlers set hcp=(210-avg)*.9 WHERE avg >0 AND avg < 200");
define(__HANDICAP2__,"update bowlers set hcp=0 WHERE avg=0 OR avg >= 200 OR avg IS NULL");


define(__USER__,'paulo');
define(__PASS__,'michael');
?>
